using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Kitware.mummy.Runtime;

namespace Kitware.VTK;

/// <summary>
///    vtkLineSource
/// </summary>
/// <remarks>
///    create a line defined by two end points
///
/// vtkLineSource is a source object that creates a polyline defined by
/// two endpoints or a collection of connected line segments. To define the line
/// by end points, use `SetPoint1` and `SetPoint2` methods. To define a broken
/// line comprising of multiple line segments, use `SetPoints` to provide the
/// corner points that for the line.
///
/// Intermediate points within line segment (when specifying end points alone) or
/// each of the individual line segments (when specifying broken line) can be
/// specified in two ways. First, when `UseRegularRefinement` is true (default),
/// the `Resolution` is used to determine how many intermediate points to add
/// using regular refinement. Thus, if `Resolution` is set to 1, a mid point will
/// be added for each of the line segments resulting in a line with 3 points: the
/// two end points and the mid point. Second, when `UseRegularRefinement` is
/// false, refinement ratios for points per segment are specified using
/// `SetRefinementRatio` and `SetNumberOfRefinementRatios`. To generate same
/// points as `Resolution` set to 1, the refinement ratios will be `[0, 0.5,
/// 1.0]`. To add the end points of the line segment `0.0` and `1.0` must be
/// included in the collection of refinement ratios.
///
/// @section ChangesVTK9 Changes in VTK 9.0
///
/// Prior to VTK 9.0, when broken line was being generated, the texture
/// coordinates for each of the individual breaks in the line ranged from [0.0,
/// 1.0]. This has been changed to generate texture coordinates in the range
/// [0.0, 1.0] over the entire output line irrespective of whether the line was
/// generated by simply specifying the end points or multiple line segments.
///
/// @par Thanks:
/// This class was extended by Philippe Pebay, Kitware SAS 2011, to support
/// broken lines as well as simple lines.
/// </remarks>
public class vtkLineSource : vtkPolyDataAlgorithm
{
	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	public new const string MRFullTypeName = "Kitware.VTK.vtkLineSource";

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	public new static readonly string MRClassNameKey;

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	static vtkLineSource()
	{
		MRClassNameKey = "class vtkLineSource";
		Methods.RegisterType(Assembly.GetExecutingAssembly(), MRClassNameKey, Type.GetType("Kitware.VTK.vtkLineSource"));
	}

	/// <summary>
	/// Automatically generated constructor - called from generated code.
	/// DO NOT call directly.
	/// </summary>
	public vtkLineSource(IntPtr rawCppThis, bool callDisposalMethod, bool strong)
		: base(rawCppThis, callDisposalMethod, strong)
	{
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkLineSource_New(ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static vtkLineSource New()
	{
		vtkLineSource result = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkLineSource_New(ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			result = (vtkLineSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var _);
		}
		return result;
	}

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public vtkLineSource()
		: base(IntPtr.Zero, callDisposalMethod: false, strong: false)
	{
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr rawCppThis = vtkLineSource_New(ref mteStatus, ref mteIndex, ref rawRefCount);
		SetCppThis(rawCppThis, callDisposalMethod: true, (mteStatus != 0 && rawRefCount >= 2) ? true : false);
	}

	/// <summary>
	/// Automatically generated protected Dispose method - called from
	/// public Dispose or the C# destructor. DO NOT call directly.
	/// </summary>
	protected override void Dispose(bool disposing)
	{
		base.Dispose(disposing);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long vtkLineSource_GetNumberOfGenerationsFromBase_01(HandleRef pThis, string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public override long GetNumberOfGenerationsFromBase(string type)
	{
		return vtkLineSource_GetNumberOfGenerationsFromBase_01(GetCppThis(), type);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long vtkLineSource_GetNumberOfGenerationsFromBaseType_02(string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static long GetNumberOfGenerationsFromBaseType(string type)
	{
		return vtkLineSource_GetNumberOfGenerationsFromBaseType_02(type);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_GetNumberOfRefinementRatios_03(HandleRef pThis);

	/// <summary>
	/// API for setting/getting refinement ratios for points added to the line
	/// segment. The ratio is in the range `[0.0, 1.0]` where 0.0 is the start of
	/// the line segment and 1.0 is the end. When generating broken lines i.e.
	/// using `SetPoints`, this specifies refinement points for each of the
	/// individual line segment. Note that `0.0` and `1.0` must be explicitly
	/// included to generate a point and the start and/or end of the line segment.
	/// This is used only when `UseRegularRefinement` is false.
	/// </summary>
	public int GetNumberOfRefinementRatios()
	{
		return vtkLineSource_GetNumberOfRefinementRatios_03(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_GetOutputPointsPrecision_04(HandleRef pThis);

	/// <summary>
	/// Set/get the desired precision for the output points.
	/// vtkAlgorithm::SINGLE_PRECISION - Output single-precision floating point.
	/// vtkAlgorithm::DOUBLE_PRECISION - Output double-precision floating point.
	/// </summary>
	public virtual int GetOutputPointsPrecision()
	{
		return vtkLineSource_GetOutputPointsPrecision_04(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkLineSource_GetPoint1_05(HandleRef pThis);

	/// <summary>
	/// Set position of first end point.
	/// </summary>
	public virtual double[] GetPoint1()
	{
		IntPtr intPtr = vtkLineSource_GetPoint1_05(GetCppThis());
		double[] array = null;
		if (IntPtr.Zero != intPtr)
		{
			array = new double[3];
			Marshal.Copy(intPtr, array, 0, array.Length);
		}
		return array;
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_GetPoint1_06(HandleRef pThis, IntPtr data);

	/// <summary>
	/// Set position of first end point.
	/// </summary>
	public virtual void GetPoint1(IntPtr data)
	{
		vtkLineSource_GetPoint1_06(GetCppThis(), data);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkLineSource_GetPoint2_07(HandleRef pThis);

	/// <summary>
	/// Set position of other end point.
	/// </summary>
	public virtual double[] GetPoint2()
	{
		IntPtr intPtr = vtkLineSource_GetPoint2_07(GetCppThis());
		double[] array = null;
		if (IntPtr.Zero != intPtr)
		{
			array = new double[3];
			Marshal.Copy(intPtr, array, 0, array.Length);
		}
		return array;
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_GetPoint2_08(HandleRef pThis, IntPtr data);

	/// <summary>
	/// Set position of other end point.
	/// </summary>
	public virtual void GetPoint2(IntPtr data)
	{
		vtkLineSource_GetPoint2_08(GetCppThis(), data);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkLineSource_GetPoints_09(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Set/Get the list of points defining a broken line
	/// </summary>
	public virtual vtkPoints GetPoints()
	{
		vtkPoints vtkPoints2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkLineSource_GetPoints_09(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkPoints2 = (vtkPoints)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkPoints2.Register(null);
			}
		}
		return vtkPoints2;
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern double vtkLineSource_GetRefinementRatio_10(HandleRef pThis, int index);

	/// <summary>
	/// API for setting/getting refinement ratios for points added to the line
	/// segment. The ratio is in the range `[0.0, 1.0]` where 0.0 is the start of
	/// the line segment and 1.0 is the end. When generating broken lines i.e.
	/// using `SetPoints`, this specifies refinement points for each of the
	/// individual line segment. Note that `0.0` and `1.0` must be explicitly
	/// included to generate a point and the start and/or end of the line segment.
	/// This is used only when `UseRegularRefinement` is false.
	/// </summary>
	public double GetRefinementRatio(int index)
	{
		return vtkLineSource_GetRefinementRatio_10(GetCppThis(), index);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_GetResolution_11(HandleRef pThis);

	/// <summary>
	/// Divide line into Resolution number of pieces. This is used when
	/// `UseRegularRefinement` is true.
	/// </summary>
	public virtual int GetResolution()
	{
		return vtkLineSource_GetResolution_11(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_GetResolutionMaxValue_12(HandleRef pThis);

	/// <summary>
	/// Divide line into Resolution number of pieces. This is used when
	/// `UseRegularRefinement` is true.
	/// </summary>
	public virtual int GetResolutionMaxValue()
	{
		return vtkLineSource_GetResolutionMaxValue_12(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_GetResolutionMinValue_13(HandleRef pThis);

	/// <summary>
	/// Divide line into Resolution number of pieces. This is used when
	/// `UseRegularRefinement` is true.
	/// </summary>
	public virtual int GetResolutionMinValue()
	{
		return vtkLineSource_GetResolutionMinValue_13(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern byte vtkLineSource_GetUseRegularRefinement_14(HandleRef pThis);

	/// <summary>
	/// Set/Get how the line segment is to be refined. One can choose to add points
	/// at regular intervals per segment (defined using `Resolution`) or explicit
	/// locations (defined using `SetRefinementRatio`). Default is true i.e
	/// `Resolution` will be used to determine placement of points within each line
	/// segment.
	/// </summary>
	public virtual bool GetUseRegularRefinement()
	{
		return (vtkLineSource_GetUseRegularRefinement_14(GetCppThis()) != 0) ? true : false;
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_IsA_15(HandleRef pThis, string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public override int IsA(string type)
	{
		return vtkLineSource_IsA_15(GetCppThis(), type);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkLineSource_IsTypeOf_16(string type);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static int IsTypeOf(string type)
	{
		return vtkLineSource_IsTypeOf_16(type);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkLineSource_NewInstance_18(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new vtkLineSource NewInstance()
	{
		vtkLineSource result = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkLineSource_NewInstance_18(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			result = (vtkLineSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var _);
		}
		return result;
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkLineSource_SafeDownCast_19(HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	///             Undocumented Block
	/// </summary>
	public new static vtkLineSource SafeDownCast(vtkObjectBase o)
	{
		vtkLineSource vtkLineSource2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkLineSource_SafeDownCast_19(o?.GetCppThis() ?? default(HandleRef), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkLineSource2 = (vtkLineSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkLineSource2.Register(null);
			}
		}
		return vtkLineSource2;
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetNumberOfRefinementRatios_20(HandleRef pThis, int arg0);

	/// <summary>
	/// API for setting/getting refinement ratios for points added to the line
	/// segment. The ratio is in the range `[0.0, 1.0]` where 0.0 is the start of
	/// the line segment and 1.0 is the end. When generating broken lines i.e.
	/// using `SetPoints`, this specifies refinement points for each of the
	/// individual line segment. Note that `0.0` and `1.0` must be explicitly
	/// included to generate a point and the start and/or end of the line segment.
	/// This is used only when `UseRegularRefinement` is false.
	/// </summary>
	public void SetNumberOfRefinementRatios(int arg0)
	{
		vtkLineSource_SetNumberOfRefinementRatios_20(GetCppThis(), arg0);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetOutputPointsPrecision_21(HandleRef pThis, int _arg);

	/// <summary>
	/// Set/get the desired precision for the output points.
	/// vtkAlgorithm::SINGLE_PRECISION - Output single-precision floating point.
	/// vtkAlgorithm::DOUBLE_PRECISION - Output double-precision floating point.
	/// </summary>
	public virtual void SetOutputPointsPrecision(int _arg)
	{
		vtkLineSource_SetOutputPointsPrecision_21(GetCppThis(), _arg);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetPoint1_22(HandleRef pThis, double _arg1, double _arg2, double _arg3);

	/// <summary>
	/// Set position of first end point.
	/// </summary>
	public virtual void SetPoint1(double _arg1, double _arg2, double _arg3)
	{
		vtkLineSource_SetPoint1_22(GetCppThis(), _arg1, _arg2, _arg3);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetPoint1_23(HandleRef pThis, IntPtr _arg);

	/// <summary>
	/// Set position of first end point.
	/// </summary>
	public virtual void SetPoint1(IntPtr _arg)
	{
		vtkLineSource_SetPoint1_23(GetCppThis(), _arg);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetPoint2_24(HandleRef pThis, double _arg1, double _arg2, double _arg3);

	/// <summary>
	/// Set position of other end point.
	/// </summary>
	public virtual void SetPoint2(double _arg1, double _arg2, double _arg3)
	{
		vtkLineSource_SetPoint2_24(GetCppThis(), _arg1, _arg2, _arg3);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetPoint2_25(HandleRef pThis, IntPtr _arg);

	/// <summary>
	/// Set position of other end point.
	/// </summary>
	public virtual void SetPoint2(IntPtr _arg)
	{
		vtkLineSource_SetPoint2_25(GetCppThis(), _arg);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetPoints_26(HandleRef pThis, HandleRef arg0);

	/// <summary>
	/// Set/Get the list of points defining a broken line
	/// </summary>
	public virtual void SetPoints(vtkPoints arg0)
	{
		vtkLineSource_SetPoints_26(GetCppThis(), arg0?.GetCppThis() ?? default(HandleRef));
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetRefinementRatio_27(HandleRef pThis, int index, double value);

	/// <summary>
	/// API for setting/getting refinement ratios for points added to the line
	/// segment. The ratio is in the range `[0.0, 1.0]` where 0.0 is the start of
	/// the line segment and 1.0 is the end. When generating broken lines i.e.
	/// using `SetPoints`, this specifies refinement points for each of the
	/// individual line segment. Note that `0.0` and `1.0` must be explicitly
	/// included to generate a point and the start and/or end of the line segment.
	/// This is used only when `UseRegularRefinement` is false.
	/// </summary>
	public void SetRefinementRatio(int index, double value)
	{
		vtkLineSource_SetRefinementRatio_27(GetCppThis(), index, value);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetResolution_28(HandleRef pThis, int _arg);

	/// <summary>
	/// Divide line into Resolution number of pieces. This is used when
	/// `UseRegularRefinement` is true.
	/// </summary>
	public virtual void SetResolution(int _arg)
	{
		vtkLineSource_SetResolution_28(GetCppThis(), _arg);
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_SetUseRegularRefinement_29(HandleRef pThis, byte _arg);

	/// <summary>
	/// Set/Get how the line segment is to be refined. One can choose to add points
	/// at regular intervals per segment (defined using `Resolution`) or explicit
	/// locations (defined using `SetRefinementRatio`). Default is true i.e
	/// `Resolution` will be used to determine placement of points within each line
	/// segment.
	/// </summary>
	public virtual void SetUseRegularRefinement(bool _arg)
	{
		vtkLineSource_SetUseRegularRefinement_29(GetCppThis(), (byte)(_arg ? 1u : 0u));
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_UseRegularRefinementOff_30(HandleRef pThis);

	/// <summary>
	/// Set/Get how the line segment is to be refined. One can choose to add points
	/// at regular intervals per segment (defined using `Resolution`) or explicit
	/// locations (defined using `SetRefinementRatio`). Default is true i.e
	/// `Resolution` will be used to determine placement of points within each line
	/// segment.
	/// </summary>
	public virtual void UseRegularRefinementOff()
	{
		vtkLineSource_UseRegularRefinementOff_30(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersSources.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkLineSource_UseRegularRefinementOn_31(HandleRef pThis);

	/// <summary>
	/// Set/Get how the line segment is to be refined. One can choose to add points
	/// at regular intervals per segment (defined using `Resolution`) or explicit
	/// locations (defined using `SetRefinementRatio`). Default is true i.e
	/// `Resolution` will be used to determine placement of points within each line
	/// segment.
	/// </summary>
	public virtual void UseRegularRefinementOn()
	{
		vtkLineSource_UseRegularRefinementOn_31(GetCppThis());
	}
}
